package com.faithbj.webservice.test;

import java.util.List;
import java.util.Map;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
 * 复杂对象实例User
 * @author chen liu
 * 注解：
 *      @XmlRootElement-指定XML根元素名称（可选）
 *      @XmlAccessorType-控制属性或方法序列化 ， 四种方案：
 *                      FIELD-对每个非静态，非瞬变属性JAXB工具自动绑定成XML，除非注明XmlTransient 
 *                      NONE-不做任何处理
 *                      PROPERTY-对具有set/get方法的属性进行绑定，除非注明XmlTransient
 *                      PUBLIC_MEMBER -对有set/get方法的属性或具有共公访问权限的属性进行绑定，除非注 明XmlTransient
 *      @XmlType-映射一个类或一个枚举类型成一个XML Schema类型 
 */

@XmlRootElement(name="User")
@XmlType(propOrder={"name","age","map","children"})
@XmlAccessorType(XmlAccessType.FIELD)
public class User {
	private String name;
	private int age;
	private Map<String, String> map;
	private List<User> children;
	
	public User(){}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}

	public Map<String, String> getMap() {
		return map;
	}

	public void setMap(Map<String, String> map) {
		this.map = map;
	}

	public List<User> getChildren() {
		return children;
	}

	public void setChildren(List<User> children) {
		this.children = children;
	}
}
